package Operation;

import Account.Account;
import Account.AcountList;

import java.util.Scanner;

public class DepositOperation extends IOperation{
    public DepositOperation() {
    }

    @Override
    public void work(Account account,AcountList acountList) {
        Scanner scanner = new Scanner(System.in);
        System.out.println("请选择存钱的金额");
        double Num = scanner.nextDouble();
        account.setMoney(account.getMoney()+Num);
        System.out.println("存钱成功");
        System.out.println(account.toString());

    }
}
